package base;

import java.util.Scanner;

public class BASIC6 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();

		int[] std = new int[n + 1];
		std[0] = 0;
		std[1] = 1;

		int[] temp;
		int[] val = std.clone();

		for (int i = 1; i <= n; i++) {
			temp = std.clone();
			for (int j = 0; j < i; j++) {
				temp[j] = val[j] + val[j + 1];
			}
			val = temp.clone();
			print(val);
		}
	}

	private static void print(int[] val) {
		// TODO Auto-generated method stub
		for (int i = 0; i < val.length; i++) {
			System.out.print(val[i] + " ");
		}
		System.out.println();
	}
}
